export const table_config = () => {
    const config = {
        pageSize: 10,
        pageNum: 1,
        total: 1000,
        rowKey: "roleId", //如果需要树型数据填写这个，否则为空
        defaultColumnWidth: null,//默认的列宽

        //UI
        defaultExpandAll: false, //是否默认展开所有行
        pagingShow: true,//本页1-2
        totalShow: true,//共10条数据
        paginationShow: true,//分页

        selectionChange:true, //是否支持多选
        searchList: [
            {placeholder: '请输入登陆地址', label: '登陆地址', key: 'roleName', type: 'text'},
            {placeholder: '请输入用户名称', label: '用户名称', key: 'roleKey', type: 'text'},
            {
                placeholder: '登陆状态',
                label: '状态',
                key: 'status',
                type: 'select',
                source: "select", //source: dict字典查询/select 数据来源方向
                select: [{value: "0", label: '成功'}, {value: "1", label: '失败'}],
            },
            {placeholder: '请选择', label: '时间', key: 'params', type: 'date'},
        ],
        buttonList: [
            {name: '刷新', type: 'primary', plain: true, emitLabel: 'refresh'},
            {name: '删除', type: 'danger', plain: true, emitLabel: 'del', power:"monitor:operlog:remove"},
            {name: '清空', type: 'info', plain: true, emitLabel: 'clean', power:"monitor:operlog:remove"},
            {name: '全部导出', type: 'success', plain: true, emitLabel: 'export', power:"monitor:operlog:export"},
        ],
        tableList: [
            {label: '访问编号', key: 'infoId'},
            {label: '用户名称', key: 'userName'},
            {label: '登陆地址', key: 'ipaddr'},
            {label: '登陆地点', key: 'loginLocation'},
            {label: '浏览器', key: 'browser', },
            {label: '操作系统', key: 'os'},
            {label: '状态', key: 'status', dicKey: "sys_request_type"},
            {label: '操作信息', key: 'msg'},
            {label: '登陆日期', key: 'loginTime'},
        ]
    }
    return config
}